/**
 * VM, ViewManager
 * 负责页面切换
 * v1.0
 */
class VM{
    public constructor(){
        this.lm = LoaderManager.getInstance();
    }

    private static instance:VM;
    public static getInstance():VM{
        if(!VM.instance){
            VM.instance = new VM();
        }
        return VM.instance;
    }

    private main:Main;
    private lm:LoaderManager;
    public init(m:any):void{
        this.main = m;
    }

    private movement:Movement;
    public addMovement():void{
        if(!this.movement){
            this.movement = new Movement();
        }
        this.main.addChild(this.movement);
    }

    private game:GameView;
    public addGame():void{
        if(!this.game){
            this.game = new GameView();
        }
        this.main.addChild(this.game);
    }

    private notice:Notice;
    public addNotice():void{
        if(!this.notice){
            this.notice = new Notice();
        }
        this.main.addChild(this.notice);
    }

    
}